﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MainApplication
{
    public partial class LoginForm : Form
    {
        public LoginForm()
        {
            InitializeComponent();
        }

        public string GetUserName()
        {
            return this.textBox_username.Text;
        }

        public string GetPassword()
        {
            return this.textBox_password.Text;
        }

        private void button_commit_Click(object sender, EventArgs e)
        {
            if (GetUserName() == "1432" && GetPassword() == "1432")
            {
                this.DialogResult = DialogResult.OK;
                Close();
            }
            else
            {
                MessageBox.Show("用户名或者密码错误！");
            }

        }

        private void button_exit_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            Close();
        }
    }
}
